<?php
/*
* $Author ：PHPYUN开发团队
*
* 官网: http://www.phpyun.com
*
* 版权所有 2009-2018 宿迁鑫潮信息技术有限公司，并保留所有权利。
*
* 软件声明：未经授权前提下，不得用于商业运营、二次开发以及任何形式的再次发布。
 */
class public_controller extends wxapp_controller{
	function register_action(){
	    $data['sy_webname'] = $this->config['sy_webname'];
	    $data['reg_moblie'] = $this->config['reg_moblie'];
	    $data['reg_email'] = $this->config['reg_email'];
	    $data['reg_user'] = $this->config['reg_user'];
	    $data['reg_usertel'] = $this->config['reg_usertel'];
	    $data['reg_real_name_check'] = $this->config['reg_real_name_check'];
	    $data['reg_passconfirm'] = $this->config['reg_passconfirm'];
	    $data['reg_username'] = $this->config['reg_username'];
	    $data['sy_msg_regcode'] = $this->config['sy_msg_regcode'];
	    $data['reg_useremail'] = $this->config['reg_useremail'];
	    
	    //企业
	    $data['reg_comemail'] = $this->config['reg_comemail'];
	    $data['reg_comlink'] = $this->config['reg_comlink'];
	    $data['reg_comtel'] = $this->config['reg_comtel'];
	    $data['reg_comname'] = $this->config['reg_comname'];
	    $data['reg_comaddress'] = $this->config['reg_comaddress'];
	    echo json_encode($data);die;
	}
	//注册协议
	function protocol_action(){
	    $M=$this->MODEL('article');
	    $content=$M->GetDescriptionOnce(array('url'=>'about/service.html'),array('field'=>'content'));
	    $data['content']=$content['content'];
	    echo json_encode($data);die;
	}
	//职位多列选择器
	function multiJob_action(){
	    $cacheM=$this->MODEL('cache');
	    $cacheList=$cacheM->GetCache('job');
	    $job_index=$cacheList['job_index'];
	    $job_type=$cacheList['job_type'];
	    $job_name=$cacheList['job_name'];
	    if ($_POST['jobid']){
	        $jobM=$this->MODEL('job');
	        $row=$jobM->GetComjobOne(array('id'=>intval($_POST['jobid'])),array('field'=>'`job1`,`job1_son`,`job_post`'));
	    }
	    $jobone=$jobtwo=$jobthree=array();
	    $mjobIndex = array(0,0,0);
	    $mjobName = array(0,0,0);
	    if(is_array($job_index)){
	        $oneid[]="0";
	        $onename[]="请选择";
	        foreach($job_index as $k=>$v){
	            $oneid[]=$v;
	            $onename[]=$job_name[$v];
	            if ($v==$row['job1']){
	                $mjobIndex[0]=$k+1;
	                $mjobName[0]=$job_name[$v];
	            }
	            if (is_array($job_type[$v])){
	                $jobtwo[$v]['id'][]="0";
	                $jobtwo[$v]['name'][]="全部";
	                foreach ($job_type[$v] as $ka=>$va){
	                    $jobtwo[$v]['id'][]=$va;
	                    $jobtwo[$v]['name'][]=$job_name[$va];
	                    if($va==$row['job1_son']){
	                        $mjobIndex[1]=$ka+1;
	                        $mjobName[1]=$job_name[$va];
	                    }
	                    if (is_array($job_type[$va])){
	                        $jobthree[$va]['id'][]="0";
	                        $jobthree[$va]['name'][]="全部";
	                        foreach ($job_type[$va] as $key=>$val){
	                            $jobthree[$va]['id'][]=$val;
	                            $jobthree[$va]['name'][]=$job_name[$val];
	                            if ($val==$row['job_post']){
	                                $mjobIndex[2]=$key+1;
	                                $mjobName[2]=$job_name[$val];
	                            }
	                        }
	                    }
	                }
	            }
	        }
	    }
	    $jobone['id']=$oneid;
	    $jobone['name']=$onename;
	    $data['mjobIndex']=$mjobIndex;
	    $data['mjobName']=$mjobName;
	    $data['jobone']=$jobone;
	    $data['job'][0]=$row['job1']?$row['job1']:0;
	    $data['job'][1]=$row['job1_son']?$row['job1_son']:0;
	    if(count($jobtwo)>0){
	        $data['jobtwo']=$jobtwo;
	    }
	    if(count($jobthree)>0){
	        $data['jobthree']=$jobthree;
	    }
	    echo json_encode($data);die;
	}
	//城市多列选择器
	function multiCity_action(){
	    $cacheM=$this->MODEL('cache');
	    $cacheList=$cacheM->GetCache('city');
	    $city_index=$cacheList['city_index'];
	    $city_type=$cacheList['city_type'];
	    $city_name=$cacheList['city_name'];
	    if ($_POST['jobid']){
	        $jobM=$this->MODEL('job');
	        $row=$jobM->GetComjobOne(array('id'=>intval($_POST['jobid'])),array('field'=>'`provinceid`,`cityid`,`three_cityid`'));
	    }
	    if ($_POST['uid']){
	        if ($_POST['usertype']==2){
	            $companyM=$this->MODEL('company');
	            $row=$companyM->GetCompanyInfo(array('uid'=>intval($_POST['uid'])),array('field'=>'`provinceid`,`cityid`,`three_cityid`'));
	        }
	    }
	    if ($_POST['partid']){
	        $partM=$this->MODEL('part');
	        $row=$partM->GetPartJobOne(array('id'=>intval($_POST['partid'])),array('field'=>'`provinceid`,`cityid`,`three_cityid`'));
	    }
	    
	    $cityone=$citytwo=$citythree=array();
	    $mcityIndex = array(0,0,0);
	    $mcityName = array(0,0,0);
	    if(is_array($city_index)){
	        $oneid[]="0";
	        $onename[]="请选择";
	        foreach($city_index as $k=>$v){
	            $oneid[]=$v;
	            $onename[]=$city_name[$v];
	            if ($v==$row['provinceid']){
	                $mcityIndex[0]=$k+1;
	                $mcityName[0]=$city_name[$v];
	            }
	            if (is_array($city_type[$v])){
	                $citytwo[$v]['id'][]="0";
	                $citytwo[$v]['name'][]="全部";
	                foreach ($city_type[$v] as $ka=>$va){
	                    $citytwo[$v]['id'][]=$va;
	                    $citytwo[$v]['name'][]=$city_name[$va];
	                    if($va==$row['cityid']){
	                        $mcityIndex[1]=$ka+1;
	                        $mcityName[1]=$city_name[$va];
	                    }
	                    if (is_array($city_type[$va])){
	                        $citythree[$va]['id'][]="0";
	                        $citythree[$va]['name'][]="全部";
	                        foreach ($city_type[$va] as $key=>$val){
	                            $citythree[$va]['id'][]=$val;
	                            $citythree[$va]['name'][]=$city_name[$val];
	                            if ($val==$row['three_cityid']){
	                                $mcityIndex[2]=$key+1;
	                                $mcityName[2]=$city_name[$val];
	                            }
	                        }
	                    }
	                }
	            }
	        }
	    }
	    $cityone['id']=$oneid;
	    $cityone['name']=$onename;
	    $data['mcityIndex']=$mcityIndex;
	    $data['mcityName']=$mcityName;
	    $data['cityone']=$cityone;
	    $data['city'][0]=$row['provinceid']?$row['provinceid']:0;
	    $data['city'][1]=$row['cityid']?$row['cityid']:0;
	    if(count($citytwo)>0){
	        $data['citytwo']=$citytwo;
	    }
	    if(count($citythree)>0){
	        $data['citythree']=$citythree;
	    }
	    echo json_encode($data);die;
	}
	
	//列表页搜索取缓存
	function searchcity_action(){
	    include(PLUS_PATH."city.cache.php");
	    $data['city_index']=$city_index;
	    $data['city_type']=$city_type;
	    $data['city_name']=$city_name;
	    echo json_encode($data);die;
	}
	//列表页搜索取缓存
	function searchjob_action(){
	    include(PLUS_PATH."job.cache.php");
	    $data['job_index']=$job_index;
	    $data['job_type']=$job_type;
	    $data['job_name']=$job_name;
	    echo json_encode($data);die;
	}
	//列表页搜索取缓存
	function searchexp_action(){
	    //职位列表页经验缓存
	    if($_POST['exp']==1){
	        include(PLUS_PATH."com.cache.php");
	        $data['exp'][0]='全部';
	        foreach ($comdata['job_exp'] as $v){
	            $data['exp'][$v]=$comclass_name[$v];
	        }
	    }elseif ($_POST['exp']==2){
	        include(PLUS_PATH."user.cache.php");
	        $data['exp'][0]='全部';
	        foreach ($userdata['user_word'] as $v){
	            $data['exp'][$v]=$userclass_name[$v];
	        }
	    }
	    echo json_encode($data);die;
	}
	function industry_action(){//获取行业类别
		include PLUS_PATH."/industry.cache.php";
		$data['industry_index']=$industry_index;  
		$rows=array();
		if(is_array($industry_name)){
			foreach($industry_name as $va=>$k){
				$rows[$va]=$k;
			}
		}  
		$data['industry_name']=$rows; 
		if ($_POST['uid']){
		    if ($_POST['eid']){
		        $row = $this->obj->DB_select_once('resume_expect','`id`='.$_POST['eid'].'','`hy`');
		    }elseif ($_POST['jobid'] && $_POST['jobid']>0){
		        $row = $this->obj->DB_select_once('company_job','`id`='.$_POST['jobid'].'','`hy`');
		    }else{
		        $row = $this->obj->DB_select_once('company','`uid`='.$_POST['uid'].'','`hy`');
		    }
		}
		$id=array();$name=array();
		if(is_array($industry_index)){
			$id[]="0";
			$name[]="请选择行业";
			foreach($industry_index as $k=>$v){
				$id[]=$v;
				$name[]=$industry_name[$v];
			}
		}
		foreach ($id as $k=>$v){
		    if ($row && $row['hy']==$v){
		        $hyIndex = $k;
		    }
		}
		$hy['id']=$id;
		$hy['name']=$name;
		$data['hy']=$hy;
		$data['hyIndex']=$hyIndex?$hyIndex:0;
		echo json_encode($data);die;
	}
	function parts_action(){
		include(PLUS_PATH."part.cache.php");
		$data['partdata']=$partdata;
		if(is_array($partclass_name)){
			foreach($partclass_name as $va=>$k){
				$rows[$va]=$k;
			}
		}  
		$data['partclass_name']=$rows;
		
		
		if(is_array($partdata['part_sex'])){
		    $sexid[]='0';
			$sexname[]="请选择性别要求";
			foreach($partdata['part_sex'] as $k=>$v){
				$sexid[]=$v;
				$sexname[]=$partclass_name[$v];
			}
		}
		$sex['id']=$sexid;
		$sex['name']=$sexname;
		$data['sex']=$sex;
		
		if(is_array($partdata['part_type'])){
		    $typeid[]='0';
			$typename[]='请选择兼职类别';
			foreach($partdata['part_type'] as $v){
				$typeid[]=$v;
				$typename[]=$partclass_name[$v];
			}
		}
		$type['id']=$typeid;
		$type['name']=$typename;
		$data['type']=$type;
		
		
		if(is_array($partdata['part_salary_type'])){
		    $salary_typeid[]='0';
			$salary_typename[]='请选择薪水类型';
			foreach($partdata['part_salary_type'] as $v){
				$salary_typeid[]=$v;
				$salary_typename[]=$partclass_name[$v];
			}
		}
		$salary_type['id']=$salary_typeid;
		$salary_type['name']=$salary_typename;
		$data['salary_type']=$salary_type;
		
		if(is_array($partdata['part_billing_cycle'])){
		    $billing_cycleid[]='0';
			$billing_cyclename[]='请选择结算周期';
			foreach($partdata['part_billing_cycle'] as $v){
				$billing_cycleid[]=$v;
				$billing_cyclename[]=$partclass_name[$v];
			}
		}
		$billing_cycle['id']=$billing_cycleid;
		$billing_cycle['name']=$billing_cyclename;
		$data['billing_cycle']=$billing_cycle;
		if ($_POST['uid'] && $_POST['partid']>0){
		    $row=$this->obj->DB_select_once("partjob","`id`='".$_POST['partid']."'","`sex`,`salary_type`,`type`,`billing_cycle`");
		    foreach ($sex['id'] as $k=>$v){
		        if ($row && $row['sex']==$v){
		            $sexIndex = $k;
		        }
		    } 
		    foreach ($salary_type['id'] as $k=>$v){
		        if ($row && $row['salary_type']==$v){
		            $salarytypeIndex = $k;
		        }
		    } 
		    foreach ($type['id'] as $k=>$v){
		        if ($row && $row['type']==$v){
		            $typeIndex = $k;
		        }
		    } 
		    foreach ($billing_cycle['id'] as $k=>$v){
		        if ($row && $row['billing_cycle']==$v){
		            $billingcycleIndex = $k;
		        }
		    } 
		}
		$data['sexIndex']=$sexIndex?$sexIndex:0;
		$data['salarytypeIndex']=$salarytypeIndex?$salarytypeIndex:0;
		$data['typeIndex']=$typeIndex?$typeIndex:0;
		$data['billingcycleIndex']=$billingcycleIndex?$billingcycleIndex:0;
		
		$morning=array('0101','0201','0301','0401','0501','0601','0701');
		$noon=array('0102','0202','0302','0402','0502','0602','0702');
		$afternoon=array('0103','0203','0303','0403','0503','0603','0703');

		if(is_array($morning)){
			foreach($morning as $k=>$v){
				$mor[$k]['name']=$v;
				$mor[$k]['checked']=false;
			}
		}
		$data['morning']=$mor;
		if(is_array($noon)){
			foreach($noon as $k=>$v){
				$noo[$k]['name']=$v;
				$noo[$k]['checked']=false;
			}
		}
		$data['noon']=$noo;
		if(is_array($afternoon)){
			foreach($afternoon as $k=>$v){
				$aft[$k]['name']=$v;
				$aft[$k]['checked']=false;
			}
		}
		$data['night']=$aft;
		
		echo json_encode($data);die;
	}
	
	function user_action(){//获取个人类别
		include(PLUS_PATH."user.cache.php");
		$data['userdata']=$userdata;
		if(is_array($userclass_name)){
			foreach($userclass_name as $va=>$k){
				$rows[$va]=$k;
			}
		}
		$data['userclass_name']=$rows;

		/*wxapp*/
		if(is_array($userdata['user_word'])){
		    $expid[]='0';
			$expname[]='请选择工作经验';
			foreach($userdata['user_word'] as $v){
				$expid[]=$v;
				$expname[]=$userclass_name[$v];
			}
		}
		$exp['id']=$expid;
		$exp['name']=$expname;
		$data['exp']=$exp;
		if(is_array($userdata['user_edu'])){
		    $eduid[]='0';
			$eduname[]='请选择最高学历';
			foreach($userdata['user_edu'] as $v){
				$eduid[]=$v;
				$eduname[]=$userclass_name[$v];
			}
		}
		$edu['id']=$eduid;
		$edu['name']=$eduname;
		$data['edu']=$edu;
		if(is_array($userdata['user_type'])){
		    $typeid[]='0';
			$typename[]='请选择工作性质';
			foreach($userdata['user_type'] as $v){
				$typeid[]=$v;
				$typename[]=$userclass_name[$v];
			}
		}
		$type['id']=$typeid;
		$type['name']=$typename;
		$data['type']=$type;
		if(is_array($userdata['user_report'])){
		    $reportid[]='0';
			$reportname[]='请选择到岗时间';
			foreach($userdata['user_report'] as $v){
				$reportid[]=$v;
				$reportname[]=$userclass_name[$v];
			}
		}
		$report['id']=$reportid;
		$report['name']=$reportname;
		$data['report']=$report;
		if(is_array($userdata['user_jobstatus'])){
		    $jobstatustid[]='0';
			$jobstatusname[]='请选择求职状态';
			foreach($userdata['user_jobstatus'] as $v){
				$jobstatustid[]=$v;
				$jobstatusname[]=$userclass_name[$v];
			}
		}
		$jobstatus['id']=$jobstatustid;
		$jobstatus['name']=$jobstatusname;
		$data['jobstatus']=$jobstatus;
		
		include(CONFIG_PATH."db.data.php");
		if(is_array($arr_data)){
		    $id[]='0';
		    $name[]='请选择性别';
		    foreach($arr_data['sex'] as $k=>$v){
		        if($k!=3){
		            $id[]=$k;
		            $name[]=$v;
		        }
		    }
		}
		$sex['id']=$id;
		$sex['name']=$name;
		$data['sex']=$sex;
		
		if($_POST['uid']){
		    //addexpect页面
		    if ($_POST['eid'] && $_POST['expect']){
		        $row=$this->obj->DB_select_once("resume_expect","`id`='".$_POST['eid']."'","`jobstatus`,`report`,`type`");
		        foreach ($jobstatus['id'] as $k=>$v){
		            if ($row && $row['jobstatus']==$v){
		                $jobstatusIndex = $k;
		            }
		        } 
		        foreach ($report['id'] as $k=>$v){
		            if ($row && $row['report']==$v){
		                $reportIndex = $k;
		            }
		        } 
		        foreach ($type['id'] as $k=>$v){
		            if ($row && $row['type']==$v){
		                $typeIndex = $k;
		            }
		        }
		    }else{
		        //info页面
		        if ($_POST['info']){
		            $row=$this->obj->DB_select_once("resume","`uid`='".$_POST['uid']."'","`sex`,`edu`,`exp`");
		            foreach ($sex['id'] as $k=>$v){
		                if ($row && $row['sex']==$v){
		                    $sexIndex = $k;
		                }
		            }
		            foreach ($edu['id'] as $k=>$v){
		                if ($row && $row['edu']==$v){
		                    $eduIndex = $k;
		                }
		            }
		            foreach ($exp['id'] as $k=>$v){
		                if ($row && $row['exp']==$v){
		                    $expIndex = $k;
		                }
		            }
		        }
		    }
		}elseif ($_POST['tinyid'] && $_POST['tinyid']>0){
		    $row = $this->obj->DB_select_once("resume_tiny","`id`='".$_POST['tinyid']."'","`sex`,`exp`");
		    foreach ($sex['id'] as $k=>$v){
		        if ($row && $row['sex']==$v){
		            $sexIndex = $k;
		        }
		    }
		    foreach ($exp['id'] as $k=>$v){
		        if ($row && $row['exp']==$v){
		            $expIndex = $k;
		        }
		    }
		}
		$data['jobstatusIndex']=$jobstatusIndex?$jobstatusIndex:0;
		$data['reportIndex']=$reportIndex?$reportIndex:0;
		$data['typeIndex']=$typeIndex?$typeIndex:0;
		$data['sexIndex']=$sexIndex?$sexIndex:0;
		$data['eduIndex']=$eduIndex?$eduIndex:0;
		$data['expIndex']=$expIndex?$expIndex:0;
		$config['resume_create_project']=$this->config['resume_create_project'];
		$config['resume_create_exp']=$this->config['resume_create_exp'];
		$config['resume_create_edu']=$this->config['resume_create_edu'];
		$data['config']=$config;
		echo json_encode($data);die;
	}
	function com_action(){//获取企业类别
		include(PLUS_PATH."com.cache.php");
		$data['comdata']=$comdata;
		if(is_array($comclass_name)){
			foreach($comclass_name as $va=>$k){
				$rows[$va]=$k;
			}
		}
		$data['comclass_name']=$rows;
		/*wxapp*/
		if(is_array($comdata['job_pr'])){
		    $prid[]='0';
			$prname[]='请选择企业性质';
			foreach($comdata['job_pr'] as $v){
				$prid[]=$v;
				$prname[]=$comclass_name[$v];
			}
		}
		$pr['id']=$prid;
		$pr['name']=$prname;
		$data['pr']=$pr;
		if(is_array($comdata['job_mun'])){
		    $munid[]='0';
			$munname[]='请选择企业规模';
			foreach($comdata['job_mun'] as $v){
				$munid[]=$v;
				$munname[]=$comclass_name[$v];
			}
		}
		$mun['id']=$munid;
		$mun['name']=$munname;
		$data['mun']=$mun;
		if(is_array($comdata['job_number'])){
		    $numberid[]='0';
			$numbername[]='请选择招聘人数';
			foreach($comdata['job_number'] as $v){
				$numberid[]=$v;
				$numbername[]=$comclass_name[$v];
			}
		}
		$number['id']=$numberid;
		$number['name']=$numbername;
		$data['number']=$number;		
		if(is_array($comdata['job_exp'])){
		    $expid[]='0';
			$expname[]='请选择工作经验';
			foreach($comdata['job_exp'] as $v){
				$expid[]=$v;
				$expname[]=$comclass_name[$v];
			}
		}
		$exp['id']=$expid;
		$exp['name']=$expname;
		$data['exp']=$exp;
		if(is_array($comdata['job_report'])){
		    $reportid[]='0';
			$reportname[]='请选择到岗时间';
			foreach($comdata['job_report'] as $v){
				$reportid[]=$v;
				$reportname[]=$comclass_name[$v];
			}
		}
		$report['id']=$reportid;
		$report['name']=$reportname;
		$data['report']=$report;
		if(is_array($comdata['job_age'])){
		    $ageid[]='0';
			$agename[]='请选择年龄要求';
			foreach($comdata['job_age'] as $v){
				$ageid[]=$v;
				$agename[]=$comclass_name[$v];
			}
		}
		$age['id']=$ageid;
		$age['name']=$agename;
		$data['age']=$age;
		if(is_array($comdata['job_edu'])){
		    $eduid[]='0';
			$eduname[]='请选择教育程度';
			foreach($comdata['job_edu'] as $v){
				$eduid[]=$v;
				$eduname[]=$comclass_name[$v];
			}
		}
		$edu['id']=$eduid;
		$edu['name']=$eduname;
		$data['edu']=$edu;
		if(is_array($comdata['job_marriage'])){
			$marriageid[]='0';
			$marriagename[]='请选择婚姻状况';
			foreach($comdata['job_marriage'] as $v){
				$marriageid[]=$v;
				$marriagename[]=$comclass_name[$v];
			}
		}
		$marriage['id']=$marriageid;
		$marriage['name']=$marriagename;
		$data['marriage']=$marriage;
		include(CONFIG_PATH."db.data.php");
		if(is_array($arr_data)){
			$id[]='0';
			$name[]='请选择性别';
			foreach($arr_data['sex'] as $k=>$v){
				$id[]=$k;
				$name[]=$v;
			}
		}
		$sex['id']=$id;
		$sex['name']=$name;
		$data['sex']=$sex;
		if(is_array($comdata['job_welfare'])){
			foreach($comdata['job_welfare'] as $k=>$v){
				$welfare[$k]['id']=$v;
				$welfare[$k]['name']=$comclass_name[$v];
			}
		}
		$data['welfare']=$welfare;
		if(is_array($comdata['job_lang'])){
			foreach($comdata['job_lang'] as $k=>$v){
				$lang[$k]['id']=$v;
				$lang[$k]['name']=$comclass_name[$v];
			}
		}
		$data['lang']=$lang;
		if ($_POST['uid']){
		    if ($_POST['jobid'] && $_POST['jobid']>0){
		        $row=$this->obj->DB_select_once("company_job","`id`='".$_POST['jobid']."'","`number`,`report`,`age`,`edu`,`exp`,`marriage`,`sex`");
		        foreach ($number['id'] as $k=>$v){
		            if ($row && $row['number']==$v){
		                $numberIndex = $k;
		            }
		        }
		        foreach ($report['id'] as $k=>$v){
		            if ($row && $row['report']==$v){
		                $reportIndex = $k;
		            }
		        }
		        foreach ($age['id'] as $k=>$v){
		            if ($row && $row['age']==$v){
		                $ageIndex = $k;
		            }
		        }
		        foreach ($edu['id'] as $k=>$v){
		            if ($row && $row['edu']==$v){
		                $eduIndex = $k;
		            }
		        }
		        foreach ($exp['id'] as $k=>$v){
		            if ($row && $row['exp']==$v){
		                $expIndex = $k;
		            }
		        }
		        foreach ($sex['id'] as $k=>$v){
		            if ($row && $row['sex']==$v){
		                $sexIndex = $k;
		            }
		        }
		        foreach ($marriage['id'] as $k=>$v){
		            if ($row && $row['marriage']==$v){
		                $marriageIndex = $k;
		            }
		        }
		    }elseif (!$_POST['jobid'] || $_POST['jobid']==0){
		        $row = $this->obj->DB_select_once("company","`uid`='".$_POST['uid']."'","`pr`,`mun`");
		        foreach ($pr['id'] as $k=>$v){
		            if ($row && $row['pr']==$v){
		                $prIndex = $k;
		            }
		        }
		        foreach ($mun['id'] as $k=>$v){
		            if ($row && $row['mun']==$v){
		                $munIndex = $k;
		            }
		        }
		    }
		}
		$data['prIndex']=$prIndex?$prIndex:0;
		$data['munIndex']=$munIndex?$munIndex:0;
		$data['numberIndex']=$numberIndex?$numberIndex:0;
		$data['reportIndex']=$reportIndex?$reportIndex:0;
		$data['ageIndex']=$ageIndex?$ageIndex:0;
		$data['eduIndex']=$eduIndex?$eduIndex:0;
		$data['expIndex']=$expIndex?$expIndex:0;
		$data['marriageIndex']=$marriageIndex?$marriageIndex:0;
		$data['sexIndex']=$sexIndex?$sexIndex:0;
		echo json_encode($data);die;
	}
	function keyword_action(){  //关键字类别
	    include(PLUS_PATH."keyword.cache.php");
	    $rows=array();
	    if(is_array($keyword)){
	        foreach($keyword as $k=>$v){
	            if ($k<20){
	                if ($v['type']==$_GET['type']){
	                    $rows[]=$v['key_name'];
	                }
	            }
	        }
	    }
	    $data['keyword']=$rows;
	    echo json_encode($data);die;
	}
}
?>